<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
	<base href="<%=basePath%>"><!-- jsp文件头和头部 -->
	<%@ include file="../../system/admin/top.jsp"%> 
	</head>
<body>
		
		
		<form action="baseinfo/${msg}.do" name="Form" id="Form" method="post">
		<input type="hidden" name="EMPID" id="EMPID" value="${pd.EMPID}"/>
		<input type="hidden" name="SEX" id="SEX" value="${pd.SEX}"/>
		<div id="zhongxin">
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工编号:</td>
				<td><input style="width:95%;" type="text" name="EMPNO" id="EMPNO" value="${pd.EMPNO}" maxlength="500" placeholder="这里输入员工编号" title="员工编号"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工姓名:</td>
				<td><input style="width:95%;" type="text" name="EMPNAME" id="EMPNAME" value="${pd.EMPNAME}" maxlength="500" placeholder="这里输入员工姓名" title="员工姓名"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工电话:</td>
				<td><input style="width:95%;" type="text" name="TELEPHONE" id="TELEPHONE" value="${pd.TELEPHONE}" maxlength="500" placeholder="这里输入员工电话" title="员工电话"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">雇佣日期:</td>
				<td><input style="width:95%;" type="text" name="HIRETIME" id="HIRETIME" value="${pd.HIRETIME}" maxlength="500" placeholder="这里输入雇佣日期 " title="雇佣日期"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">职务:</td>
				<td><input style="width:95%;" type="text" name="TITLE" id="TITLE" value="${pd.TITLE}" maxlength="500" placeholder="这里输入职务" title="职务"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">薪水:</td>
				<td><input style="width:95%;" type="text" name="SALARY" id=""SALARY"" value="${pd.SALARY}" maxlength="500" placeholder="这里输入薪水" title="薪水"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">姓别:</td>
				<td>
					<label style="float:left;padding-left: 12px;"><input name="form-field-radio" id="form-field-radio1" onclick="setType('男');" <c:if test="${pd.SEX == '男' }">checked="checked"</c:if> type="radio" value="icon-edit"><span class="lbl">男</span></label>
					<label style="float:left;padding-left: 5px;"><input name="form-field-radio" id="form-field-radio2" onclick="setType('女');" <c:if test="${pd.SEX == '女' }">checked="checked"</c:if> type="radio" value="icon-edit"><span class="lbl">女</span></label>
				</td>
			</tr>
			<tr>
				<td style="text-align: center;" colspan="10">
					<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
					<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
				</td>
			</tr>
		</table>
		</div>
		
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		
	</form>
		
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript" src="static/js/bootbox.min.js"></script><!-- 确认窗口 -->
		<!-- 引入 -->
		<script type="text/javascript" src="static/js/jquery.tips.js"></script><!--提示框-->
        <script type="text/javascript">
		
		$(top.hangge());
		
		function setType(value){
		
			$("#SEX").val(value);
			alert($("#SEX").val());
		}
		
		//保存
		function save(){
		   if($("#EMPNO").val()==""){
				$("#EMPNO").tips({
					side:3,
		            msg:'请输入员工编号',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#EMPNO").focus();
				return false;
			}
			if($("#EMPNAME").val()==""){
				$("#EMPNAME").tips({
					side:3,
		            msg:'请输入员工姓名',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#EMPNAME").focus();
				return false;
			}
		
			if($("#SEX").val()==""){
				$("#form-field-radio1").tips({
					side:3,
		            msg:'请选择姓别',
		            bg:'#AE81FF',
		            time:2
		        });
				return false;
			}
			$("#Form").submit();
		}
		
		
		
		</script>
		
		
	</body>
</html>

